Socket
Socket
Sign inDemoInstall

@jest/reporters

Package Overview
Dependencies
153
Maintainers
3
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @jest/reporters

Jest's reporters


Version published
Weekly downloads
18M
decreased by-21.9%
Maintainers
3
Install size
18.7 MB
Created
Weekly downloads
 

Package description

What is @jest/reporters?

The @jest/reporters package provides utilities for handling and customizing the output of test results when using Jest, a popular JavaScript testing framework. It allows developers to create custom reporters to modify how test results are reported, making it easier to integrate with various CI tools, generate reports in different formats, or enhance the testing experience with additional logging and notifications.

What are @jest/reporters's main functionalities?

Custom Test Reporter

This feature allows developers to create a custom test reporter by implementing methods that Jest calls at different stages of the test run. The example shows a basic custom reporter that logs messages at the start and end of the test suite, as well as after each test result.

class MyCustomReporter {
  onRunStart(results, options) {
    console.log('Test suite started');
  }

  onTestResult(test, testResult, aggregatedResult) {
    console.log(`Test ${test.path} finished with ${testResult.numFailingTests} failures`);
  }

  onRunComplete(contexts, results) {
    console.log('All tests completed');
  }
}

module.exports = MyCustomReporter;

Other packages similar to @jest/reporters

Changelog

Source

29.7.0

Features

  • [create-jest] Add npm init / yarn create initialiser for Jest projects (#14465)
  • [jest-validate] Allow deprecation warnings for unknown options (#14499)

Fixes

  • [jest-resolver] Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined (#14507)
  • [jest-snapshot] Allow for strings as well as template literals in inline snapshots (#14465)
  • [@jest/test-sequencer] Calculate test runtime if perStats.duration is missing (#14473)

Performance

  • [@jest/create-cache-key-function] Cache access of NODE_ENV and BABEL_ENV (#14455)

Chore & Maintenance

  • [jest-cli] Move internal config initialisation logic to the create-jest package (#14465)

FAQs

Last updated on 12 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc